switch (column) {
case 0: /* "-" */ /* unknown fields for the moment */
sscanf(c, "%lu", µsecs);
- wpt->microseconds += microsecs % 1000000;
- wpt->creation_time += microsecs / 1000000;
+ wpt->SetCreationTime(microsecs / 1000000, microsecs % 1000000);
break;
case 1: /* Time UTC */
sscanf(c,"%lf",&hmsd);
tm.tm_year += 1900;
tm.tm_mon += 1;
snprintf(sdate, sizeof(sdate), "%02d%02d%02d", tm.tm_mday, tm.tm_mon, tm.tm_year % 100);
- snprintf(stime, sizeof(stime), "%02d%02d%02d.%02d", tm.tm_hour, tm.tm_min, tm.tm_sec, wpt->microseconds / 10000);
- if (wpt->microseconds / 10000 == 0) {
+ snprintf(stime, sizeof(stime), "%02d%02d%02d.%02d", tm.tm_hour, tm.tm_min, tm.tm_sec, wpt->creation_time.time().msec());
+ if (wpt->creation_time.time().msec() == 0) {
stime[6] = 0;
}
} else {
wpt->creation_time = time;
if RND(3) {
- wpt->microseconds = rand_int(1000) * 1000;
+ wpt->creation_time.addMSecs(rand_int(1000) * 1000);
}
time += rand_int(10) + 1;
for (index = 0; index < count; index++) {
waypoint *wpt = list[index];
- if (wpt->microseconds == 2) { /* log continued */
+ if (wpt->wpt_flags.fmt_use == 2) { /* log continued */
track = NULL;
}
if (track == NULL) {
}
}
track_add_wpt(track, wpt);
- if (wpt->microseconds == 1) { /* log pause */
+ if (wpt->wpt_flags.fmt_use == 1) { /* log pause */
track = NULL;
}
- wpt->microseconds = 0;
+ wpt->wpt_flags.fmt_use = 0;
}
xfree(list);
break;
case 11:
if (what == 1) {
- wpt->microseconds = atoi(str); /* memory point type */
+ wpt->wpt_flags.fmt_use = atoi(str); /* memory point type */
}
break;
}